import datetime

current_time = datetime.datetime.now()
str_time = current_time.strftime('%Y-%m-%d %H:%M:%S')
print(str_time)

total_second = current_time.hour * 3600 + current_time.minute * 60 + current_time.second
print('总共' + str(total_second) + '秒')
